package com.darksides.lendit.resource;

import java.util.logging.Logger;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.stereotype.Controller;

import com.google.appengine.api.utils.SystemProperty;

@Path("/lendit")
@Produces(MediaType.TEXT_PLAIN) // "text/plain" ou "text/xml"(MediaType.TEXT_XML)
@Controller
public class LenditResource {
	
	private static final Logger log = Logger.getLogger(LenditResource.class.getName());
	
	public LenditResource() {
		log.info("LenditResource - constructor");
	}
	
	@GET 
	@Path("/version")
	public String version() {
		return SystemProperty.applicationVersion.get().substring(0, 9);
	}
	
}